Skip to content

Conversation

ChaiTRex
Copy link
Contributor

@ChaiTRex ChaiTRex commented Jun 20, 2025

Except in tests, convert integer.ilog(10) to integer.ilog10() for better speed and to provide better examples of code that efficiently counts decimal digits. I couldn't find any instances of integer.ilog(2).

@rustbot
Copy link
Collaborator

rustbot commented Jun 20, 2025

r? @workingjubilee

rustbot has assigned @workingjubilee.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Jun 20, 2025
@workingjubilee
Copy link
Member

Thanks!

@bors r+ rollup=never

@bors
Copy link
Collaborator

bors commented Jun 20, 2025

📌 Commit a87115c has been approved by workingjubilee

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 20, 2025
@tgross35
Copy link
Contributor

I was pretty surprised that we don't seem to have a clippy lint for this, so I wrote a quick issue up rust-lang/rust-clippy#15084

@bors
Copy link
Collaborator

bors commented Jun 20, 2025

☔ The latest upstream changes (presumably #142294) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 20, 2025
@tgross35
Copy link
Contributor

This one can probably be rolled up - upon closer inspection, this only affects code in consts and one thing in rustdoc html 😆

@workingjubilee
Copy link
Member

oh true.

@bors rollup=always

@ChaiTRex ChaiTRex closed this Jun 20, 2025
@ChaiTRex ChaiTRex force-pushed the ilog_10_to_ilog10 branch from a87115c to 5b74275 Compare June 20, 2025 07:19
@ChaiTRex
Copy link
Contributor Author

Resolved merge conflict by starting over.

@ChaiTRex ChaiTRex reopened this Jun 20, 2025
@workingjubilee
Copy link
Member

if it works, it works!

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jun 20, 2025

📌 Commit 88f1ed4 has been approved by workingjubilee

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 20, 2025
Kobzol added a commit to Kobzol/rust that referenced this pull request Jun 20, 2025
…ingjubilee

Convert `ilog(10)` to `ilog10()`

Except in tests, convert `integer.ilog(10)` to `integer.ilog10()` for better speed and to provide better examples of code that efficiently counts decimal digits. I couldn't find any instances of `integer.ilog(2)`.
bors added a commit that referenced this pull request Jun 20, 2025
Rollup of 11 pull requests

Successful merges:

 - #142478 (install docs for each target in different directory)
 - #142629 (Add config builder for bootstrap tests)
 - #142715 (correct template for `#[align]` attribute)
 - #142720 (De-dup common code from `ExternalCrate` methods)
 - #142736 (add issue template for rustdoc)
 - #142743 (rustc-dev-guide subtree update)
 - #142744 (Add a mailmap entry for y21)
 - #142758 (Make sure to rebuild rustdoc if `src/rustdoc-json-types` is changed)
 - #142764 (Convert `ilog(10)` to `ilog10()`)
 - #142767 (Some symbol and PathRoot cleanups)
 - #142769 (remove equivalent new method on context)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Jun 20, 2025
Rollup of 10 pull requests

Successful merges:

 - #142629 (Add config builder for bootstrap tests)
 - #142715 (correct template for `#[align]` attribute)
 - #142720 (De-dup common code from `ExternalCrate` methods)
 - #142736 (add issue template for rustdoc)
 - #142743 (rustc-dev-guide subtree update)
 - #142744 (Add a mailmap entry for y21)
 - #142758 (Make sure to rebuild rustdoc if `src/rustdoc-json-types` is changed)
 - #142764 (Convert `ilog(10)` to `ilog10()`)
 - #142767 (Some symbol and PathRoot cleanups)
 - #142769 (remove equivalent new method on context)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 74cea63 into rust-lang:master Jun 20, 2025
10 of 13 checks passed
@rustbot rustbot added this to the 1.89.0 milestone Jun 20, 2025
rust-timer added a commit that referenced this pull request Jun 20, 2025
Rollup merge of #142764 - ChaiTRex:ilog_10_to_ilog10, r=workingjubilee

Convert `ilog(10)` to `ilog10()`

Except in tests, convert `integer.ilog(10)` to `integer.ilog10()` for better speed and to provide better examples of code that efficiently counts decimal digits. I couldn't find any instances of `integer.ilog(2)`.
github-actions bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Jun 23, 2025
Rollup of 10 pull requests

Successful merges:

 - rust-lang/rust#142629 (Add config builder for bootstrap tests)
 - rust-lang/rust#142715 (correct template for `#[align]` attribute)
 - rust-lang/rust#142720 (De-dup common code from `ExternalCrate` methods)
 - rust-lang/rust#142736 (add issue template for rustdoc)
 - rust-lang/rust#142743 (rustc-dev-guide subtree update)
 - rust-lang/rust#142744 (Add a mailmap entry for y21)
 - rust-lang/rust#142758 (Make sure to rebuild rustdoc if `src/rustdoc-json-types` is changed)
 - rust-lang/rust#142764 (Convert `ilog(10)` to `ilog10()`)
 - rust-lang/rust#142767 (Some symbol and PathRoot cleanups)
 - rust-lang/rust#142769 (remove equivalent new method on context)

r? `@ghost`
`@rustbot` modify labels: rollup
tautschnig pushed a commit to model-checking/verify-rust-std that referenced this pull request Jul 3, 2025
…ingjubilee

Convert `ilog(10)` to `ilog10()`

Except in tests, convert `integer.ilog(10)` to `integer.ilog10()` for better speed and to provide better examples of code that efficiently counts decimal digits. I couldn't find any instances of `integer.ilog(2)`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants